function updatelink(){
	var name = $("#name").val();
	var phone = $("#phone").val();
	var pattern = /^[1]{1}[0-9]{10}$/;
	if(!pattern.test(phone)){
		document.getElementById("update_tip").hidden = false;
		document.getElementById("update_tip").innerHTML = "手机号格式错误";
	}else{
		$.ajax({
			type:"post",
			url:"updatelink",
			async:true,
			data:{name:name,phone:phone},
			dataType:"json",
			success:function(data){
				if(data==1){
					document.getElementById("update_tip").hidden = false;
					document.getElementById("update_tip").innerHTML = "修改成功";
				}else{
					document.getElementById("update_tip").hidden = false;
					document.getElementById("update_tip").innerHTML = "修改失败";
				}
			},
			error:function(){
				document.getElementById("update_tip").hidden = false;
				document.getElementById("update_tip").innerHTML = "系统故障";
			}
		});
	}
}
